Data Science by John Kelleher

Data Science by John Kelleher

Author:John Kelleher [Kelleher, John]
Language: eng
Format: epub
Tags: Data science; data; data sets; computer science, data mining; machine learning; ML; decision-making; advertising; targeting; analysis; modelling; deep learning; gather; storage; privacy
Publisher: MIT Press
Published: 2018-05-24T00:00:00+00:00


Decision Trees

Linear regression and neural networks work best with numeric inputs. If the input attributes in a data set are primarily nominal or ordinal, however, then other ML algorithms and models, such as decision trees, may be more appropriate.

A decision tree encodes a set of if then, else rules in a tree structure. Figure 16 illustrates a decision tree for deciding whether an email is spam or not. Rectangles with rounded corners represent tests on attributes, and the square nodes indicate decision, or classification, nodes. This tree encodes the following rules: if the email is from an unknown sender, then it is spam; if it isn’t from an unknown sender but contains suspicious words, then it is spam; if it is neither from an unknown sender nor contains suspicious words, then it is not spam. In a decision tree, the decision for an instance is made by starting at the top of the tree and navigating down through the tree by applying a sequence of attribute tests to the instance. Each node in the tree specifies one attribute to test, and the process descends the tree node by node by choosing the branch from the current node with the label matching the value of the test attribute of the instance. The final decision is the label of the terminating (or leaf) node that the instance descends to.

Figure 16 A decision tree for determining whether an email is spam or not.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.